From: Dan Winship Date: Mon, 18 Apr 2011 13:52:21 +0000 (-0400) Subject: altTab: fix Alt+Tab scrolling on initial display X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8309 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fe08edbe2bf88aa43b643a8f8449dd49a3bafabe;p=gnome-shell.git altTab: fix Alt+Tab scrolling on initial display The initial selection of the Alt+Tab dialog was happening before the dialog was shown and allocated, and so the "do we need to scroll" check used bogus coordinates. Fix by showing the dialog (and forcing an allocation) first. https://bugzilla.gnome.org/show_bug.cgi?id=647807 --- diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 43b755230..736674e92 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -145,6 +145,12 @@ AltTabPopup.prototype = { this._appIcons = this._appSwitcher.icons; + // Need to force an allocation so we can figure out whether we + // need to scroll when selecting + this.actor.opacity = 0; + this.actor.show(); + this.actor.get_allocation_box(); + // Make the initial selection if (switch_group) { if (backward) { @@ -174,8 +180,6 @@ AltTabPopup.prototype = { return false; } - this.actor.opacity = 0; - this.actor.show(); Tweener.addTween(this.actor, { opacity: 255, time: POPUP_FADE_TIME,